package com.braveman.im.api;

import com.braveman.im.bean.AddFriendsAndGroupBean;
import com.braveman.im.bean.CardBean;
import com.braveman.im.bean.CardDeleteBean;
import com.braveman.im.bean.CardDetailsBean;
import com.braveman.im.bean.ChangeGroupAndComplate;
import com.braveman.im.bean.ChangePasswordBean;
import com.braveman.im.bean.CommentAddBean;
import com.braveman.im.bean.CompileBean;
import com.braveman.im.bean.ComplainBean;
import com.braveman.im.bean.FriendGroupNameBean;
import com.braveman.im.bean.FriendRemarkBean;
import com.braveman.im.bean.FriendsComentsBean;
import com.braveman.im.bean.FriendshipListBean;
import com.braveman.im.bean.GetDetailsByImGroupId;
import com.braveman.im.bean.DataItemBean;
import com.braveman.im.bean.EditPersonInfoBean;
import com.braveman.im.bean.GetFriendsInfoByIMid;
import com.braveman.im.bean.GetMineFriendsBean;
import com.braveman.im.bean.GetMomentsDeatils;
import com.braveman.im.bean.GetUserCommentsBean;
import com.braveman.im.bean.GroupDesBean;
import com.braveman.im.bean.GroupDetailsBean;
import com.braveman.im.bean.GroupOfDetailsBean;
import com.braveman.im.bean.HomeSearchBean;
import com.braveman.im.bean.JoinBean;
import com.braveman.im.bean.LikeAddBean;
import com.braveman.im.bean.MineMomentBean;
import com.braveman.im.bean.MyUnitsBean;
import com.braveman.im.bean.NoticeBean;
import com.braveman.im.bean.NotifyDetailBean;
import com.braveman.im.bean.PersonInfoDetailsBean;
import com.braveman.im.bean.PersonalDataBaen;
import com.braveman.im.bean.ReponseFileBean;
import com.braveman.im.bean.SendLoveNotifyBean;
import com.braveman.im.bean.SendLoveNotifyDetailsBean;
import com.braveman.im.bean.SendMomentBean;
import com.braveman.im.bean.SendNoticeBean;
import com.braveman.im.bean.UploadABusinessBean;
import com.braveman.im.bean.TopGroupSettingBean;
import com.braveman.im.bean.UploadAbusinessCardBean;
import com.braveman.im.bean.VerificationCodeBean;
import com.braveman.im.bean.CreateGroupInfoBean;
import com.braveman.im.bean.GetGroupListBean;
import com.braveman.im.bean.GroupInfoBean;
import com.braveman.im.bean.GroupMemberBean;
import com.braveman.im.bean.LoginBean;
import com.braveman.im.bean.PicUpdateBean;
import com.braveman.im.bean.PlatfromListBean;
import com.braveman.im.bean.RegisterInfoBean;
import com.braveman.im.bean.RequseForGetCodeBean;
import com.braveman.im.bean.ResponseForGetCodeBean;
import com.braveman.im.bean.TextyApiBean;
import com.braveman.im.bean.ZhengQiChengXinPlatformBean;
import com.braveman.im.ui.activity.ComplainActivity;
import com.ht.baselibs.bean.BaseGetBean;
import com.braveman.im.bean.AccountShopBean;
import com.braveman.im.bean.AdvertisementBean;
import com.braveman.im.bean.BalanceBean;
import com.braveman.im.bean.GetShopList;
import com.braveman.im.bean.KeyAndValueBean;
import com.braveman.im.bean.LocationBean;
import com.braveman.im.bean.NotifyBean;
import com.braveman.im.bean.ShopDetailsBean;
import com.braveman.im.constant.HttpConfig;

import java.util.ArrayList;
import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

public interface Api {
    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> sendValidate(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("type") String type
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> register(
            @Field("serviceCode") String serviceCode,
            @Field("shopName") String shopName,
            @Field("industryCode") String industryCode,
            @Field("cellphone") String cellphone,
            @Field("code") String code,
            @Field("password") String password
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> login(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("password") String password
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<List<KeyAndValueBean>> getSettleType(
            @Field("serviceCode") String serviceCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<List<LocationBean>> getCityList(
            @Field("serviceCode") String serviceCode,
            @Field("parentCode") String parentCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<GetShopList> shopList(
            @Field("serviceCode") String serviceCode,
            @Field("uid") long uid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> bindQrCode(
            @Field("serviceCode") String serviceCode,
            @Field("userId") long userId,
            @Field("code") String code,
            @Field("shopId") long shopId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BalanceBean> getBalance(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ResponseBody> consult(
            @Field("serviceCode") String serviceCode,
            @Field("requestData") String requestData
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BaseGetBean> clientid(
            @Field("serviceCode") String serviceCode,
            @Field("clientid") String clientid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> resetPwd(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("password") String password,
            @Field("code") String code
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> logout(
            @Field("serviceCode") String serviceCode,
            @Field("accessToken") String accessToken
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> syncAccoutInfo(
            @Field("serviceCode") String serviceCode,
            @Field("id") long id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ShopDetailsBean> shopDetails(
            @Field("serviceCode") String serviceCode,
            @Field("id") String id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<List<NotifyBean>> getNotfy(
            @Field("serviceCode") String serviceCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AdvertisementBean> getAdvertisement(
            @Field("serviceCode") String serviceCode
    );

    @POST("smsCaptcha/add")
    Call<AdvertisementBean> textApi(
            @Body TextyApiBean textyApiBean
    );

    @POST("smsCaptcha/add")
    Call<AdvertisementBean> textApiYanghao(
            @Body TextyApiBean textyApiBean
    );

    @POST("smsCaptcha/add")
    Call<ResponseForGetCodeBean> getCode(
            @Body RequseForGetCodeBean requseForGetCodeBean
    );

    @POST("member/add")
    Call<RegisterInfoBean> registerInfor(
            @Body RegisterInfoBean registerInfoBean
    );

    @POST("member/update")
    Call<RegisterInfoBean> registerUpdateInfo(
            @Query("id") String id,
            @Body RegisterInfoBean registerInfoBean
    );

    @POST("session/add")
    Call<LoginBean> login(
            @Body LoginBean loginBean
    );

    @POST("session/logout")
    Call<String> loginOut(
    );

    @Multipart
    @POST("fileupload")
    Call<List<PicUpdateBean>> uploadPic(
            @Query("fileType") String image,
            @Part MultipartBody.Part file
    );

    @Multipart
    @POST("fileupload")
    Call<List<PicUpdateBean>> uploadPicGroup(
            @Query("fileType") String image,
            @Part() MultipartBody.Part[] file
    );


    @POST("cxgroup/application/add")
    Call<CreateGroupInfoBean> UpdateGroupInfo(
            @Body CreateGroupInfoBean createGroupInfoBean
    );

    @POST("cxgroup/myJoined/list")
    Call<GroupInfoBean> getGroupList(
    );

    @GET("cxplateform/list")
    Call<List<PlatfromListBean>> getPalefromList(

    );

    @GET("cxgroup/myJoined/list")
    Call<GetGroupListBean> getGroupJoinList(

    );

    //个人资料
    @GET("member/getProfile")
    Call<PersonalDataBaen> getPersonalData(

    );

    @GET("complaint/subject/list")
//投诉群
    Call<List<ComplainBean>> getComplain(
            @Query("subjectFor") String group
    );

    @POST("cxgroup/notice/list")
//获取单个群公告列表
    Call<GroupDesBean> getChildBean(
            @Query("cxGroupId") String Id,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize

    );

    @GET("friend/viewDetail")
//好友资料
    Call<PersonInfoDetailsBean> getPersonInfoDetails(
            @Query("friendId") String friendId
    );

    @GET("friend/viewFriendMore")
//好友资料-更多
    Call<PersonInfoDetailsBean> getPersonInfoDetailsMore(
            @Query("friendId") String friendId
    );

    //群主页
    @GET("cxgroup/getProfile")
    Call<GroupOfDetailsBean> getGroupDetails(
            @Query("id") String id
    );

    //我的单位
    @GET("cxgroup/my/company/list")
    Call<List<MyUnitsBean>> getUnits(
    );


    @POST("cxgroup/member/list")
    Call<GroupMemberBean> getGroupMemberList(
            @Query("cxGroupId") String cxGroupId,
            @Query("pageNo") Integer pageNo,
            @Query("pageSize") Integer pageSize
    );

    @POST("smsCaptcha/add")
    Call<VerificationCodeBean> verificationCode(
            @Body VerificationCodeBean verificationCodeBean
    );

    @POST("password/find")
    Call<ChangePasswordBean> changePassworBean(
            @Body ChangePasswordBean changePass
    );

    //分组获取好友列表
    @POST("friend/friendship/listByCategory")
    Call<List<GetMineFriendsBean>> getMineFriends(
    );

    //获取好友列表
    @GET("friend/friendship/listAll")
    Call<List<FriendshipListBean>> getMineFriendsList(
    );

    //全部群公告
    @POST("cxgroup/notice/myJoined/list")
    Call<NoticeBean> getGroupNotice(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //单个群公告
    @POST("cxgroup/notice/list")
    Call<NoticeBean> getGroupNoticeForOnly(
            @Query(("cxGroupId")) String cxGroupId,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("cxplateform/notice/myJoined/list")
    Call<NoticeBean> getPlateformNotice(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("friend/searchMember")
    Call<AddFriendsAndGroupBean> searchFriendsList(
            @Query("queryStr") String queryStr,
            @Query("queryOfInterest") boolean queryOfInterest,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("cxgroup/list")
    Call<AddFriendsAndGroupBean> searchGroupList(
            @Query("queryStr") String queryStr,
            @Query("queryOfInterest") boolean queryOfInterest,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("cxplateform/list")
    Call<AddFriendsAndGroupBean> searchPaltformList(
            @Query("queryStr") String queryStr,
            @Query("queryOfInterest") boolean queryOfInterest,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("friend/application/list")
    Call<AddFriendsAndGroupBean> getJoinFriendsList(

            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );//

    @POST("cxplateform/joinApplication/list")
    Call<AddFriendsAndGroupBean> getJoinplateformList(

            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("cxgroup/joinApplication/list")
    Call<AddFriendsAndGroupBean> getJoinApplicationList(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("friend/application/add")
    Call<AddFriendsAndGroupBean> addFriendsEdit(
            @Body AddFriendsAndGroupBean addFriendsAndGroupBean
    );

    @POST("friend/application/audit")
    Call<AddFriendsAndGroupBean> auditFriends(
            @Body AddFriendsAndGroupBean addFriendsAndGroupBean
    );

    @POST("cxgroup/joinApplication/manager/audit")
    Call<AddFriendsAndGroupBean> auditGroup(
            @Body AddFriendsAndGroupBean addFriendsAndGroupBean
    );

    @POST("cxplateform/joinApplication/manager/audit")
    Call<AddFriendsAndGroupBean> auditPlateform(
            @Body AddFriendsAndGroupBean addFriendsAndGroupBean
    );

    //系统公告
    @POST("notice/list")
    Call<NoticeBean> getSystemNotify(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //爱心
    @POST("cxcare/donation/list")
    Call<SendLoveNotifyDetailsBean> getLoveNotifyList(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //广告
    @POST("cxad/list")
    Call<SendLoveNotifyDetailsBean> getAdvertisingList(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //发布爱心
    @POST("cxcare/donation/add")
    Call<ReponseFileBean> sendLoveNotify(
            @Body SendLoveNotifyBean sendLoveNotifyBean
    );

    //发布广告
    @POST("cxad/add")
    Call<ReponseFileBean> sendAdNotify(
            @Body SendLoveNotifyBean sendLoveNotifyBean
    );

    //群主公告详情
    @GET("cxgroup/notice/get")
    Call<NotifyDetailBean> getGroupNotifyDetails(
            @Query("id") String id
    );

    //平台公告详情
    @GET("cxplateform/notice")
    Call<NotifyDetailBean> getPlateformNotifyDetails(
            @Query("id") String id
    );

    //系统公告详情
    @GET("notice/get")
    Call<NotifyDetailBean> getSystemNotifyDetails(
            @Query("id") String id
    );

    //爱心详情
    @POST("cxcare/donation/get")
    Call<NotifyDetailBean> getLoveDetails(
            @Query("id") String id
    );

    //广告详情
    @POST("cxad/get")
    Call<NotifyDetailBean> getAdDetails(
            @Query("id") String id
    );

    //搜索
    @POST("search/")
    Call<HomeSearchBean> homeSearch(
            @Query("queryStr") String queryStr,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //群top10
    @POST("cxgroup/member/changeStick")
    Call<TopGroupSettingBean> settingTopGroup(
            @Body TopGroupSettingBean topGroupSettingBean
    );

    //申请加群
    @POST("cxgroup/joinApplication/add")
    Call<JoinBean> joinApplication(
            @Body JoinBean joinBean
    );

    @POST("member/businessCard/list")
    Call<CardBean> getCard(
            @Query("queryStr") String queryStr,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    @POST("member/businessCard/add")
    Call<UploadABusinessBean> getUpLoad(
            @Body UploadABusinessBean uploadABusinessBean
    );

    //我的详细信息
    @GET("member/get")
    Call<DataItemBean> getDataItem(
    );

    //修改个人信息
    @POST("member/profile/update")
    Call<EditPersonInfoBean> editPersonInfo(
            @Body EditPersonInfoBean editPersonInfoBean
    );

    //根据IMID区分聊天
    @POST("cxgroup/getByImGroupIds")
    Call<List<GetDetailsByImGroupId>> getByImGroupIds(
            @Query("imGroupIds") ArrayList<String> imGroupIds
    );

    //发布群公告
    @POST("cxgroup/notice/add")
    Call<SendNoticeBean> sendGroupNotice(
            @Body SendNoticeBean sendNoticeBean
    );

    //获取群详情
    @GET("cxgroup/get")
    Call<GroupDetailsBean> getGroupDetils(
            @Query("id") String id
    );

    //上传名片
    @POST("member/businessCard/add")
    Call<UploadAbusinessCardBean> getUpLoad(
            @Body UploadAbusinessCardBean updata
    );

    //名片编辑
    @POST("member/businessCard/update")
    Call<CompileBean> getUpdate(
            @Query("id") String id,
            @Body CompileBean compileBean
    );

    //删除名片
    @POST("member/businessCard/delete")
    Call<CardDeleteBean> getDelete(
            @Query("id") String id
    );

    //名片详细信息
    @POST("member/businessCard/get")
    Call<CardDetailsBean> getDetails(
            @Query("id") String id
    );

    //获取好友分组
    @GET("friend/user/category/list")
    Call<List<FriendGroupNameBean>> getFriendGroupName(
    );

    //添加好友分组
    @POST("friend/user/category/add")
    Call<FriendGroupNameBean> addFriendGroupName(
            @Body FriendGroupNameBean friendGroupNameBean
    );

    //删除好友分组
    @POST("friend/user/category/delete")
    Call<FriendGroupNameBean> deleteFriendGroupName(
            @Query("id") String id
    );

    //根据IMID获取好友信息
    @POST("friend/getByImUsernames")
    Call<List<GetFriendsInfoByIMid>> getFriendInfoByIMid(
            @Query("imUsernames") ArrayList<String> imUsernames
    );    //根据IMID获取好友信息

    @POST("friend/viewDetailByImUsername")
    Call<GetFriendsInfoByIMid> getFriendInfoByIMidOnly(
            @Query("friendImUsername") String friendImUsername
    );

    //修改好友分组
    @POST("friend/friendship/updateUserFriendCategory")
    Call<FriendGroupNameBean> changeFriendGroupName(
            @Query("friendId") String friendId,
            @Query("userFriendCategoryId") String userFriendCategoryId

    );

    //修改单位信息或者群组信息
    @POST("cxgroup/manager/update")
    Call<ChangeGroupAndComplate> changeComplateInfo(
            @Query("id") String id,
            @Body ChangeGroupAndComplate changeGroupAndComplate

    );

    //个人发布诚友圈
    @POST("moment/add")
    Call<SendMomentBean> sendMoment(
            @Body SendMomentBean sendMomentBean
    );

    //我的诚友圈列表
    @POST("moment/list")
    Call<MineMomentBean> getMineMomentList(
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //我的诚友圈详情

    @GET("moment/get")
    Call<GetMomentsDeatils> getMineMomentDetails(
            @Query("id") String id
    );

    //删除
    @POST("moment/delete")
    Call<GetMomentsDeatils> deleteMoment(
            @Query("id") String id
    );

    //点赞
    @POST("moment/comment/like")
    Call<LikeAddBean> likeAdd(
            @Body LikeAddBean likeAddBean
    );

    //评论
    @POST("moment/comment/add")
    Call<CommentAddBean> commentAdd(
            @Body CommentAddBean likeAddBean
    );

    //好友诚友圈
    @GET("moment/moments")
    Call<FriendsComentsBean> friendsMoments(
            @Query("residenceId") String residenceId,
            @Query("interestCategoryId") String interestCategoryId,
            @Query("corpIndustryId") String corpIndustryId,
            @Query("birthpalceId") String birthpalceId,
            @Query("userFriendCategoryId") String userFriendCategoryId,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    //更新用户备注
    @POST("friend/friendship/updateRemarkTags")
    Call<FriendRemarkBean> friendRemark(
            @Query("friendId") String friendId,
            @Body FriendRemarkBean friendRemarkBean
    );

    //获取用户用户备注
    @GET("friend/friendship/getRemarkTags")
    Call<GetUserCommentsBean> getUserComments(
            @Query("friendId") String friendId
    );

    //    //加入的正气诚信平台
//    @GET("cxplateform/getProfile")
//    Call<ZhengQiChengXinPlatformBean> zqcxPlatform(
//            @Query("id") String id
//    );
    //加入的正气诚信平台
    @GET("cxplateform/myJoined/list")
    Call<ZhengQiChengXinPlatformBean> zqcxPlatform(
    );

}
